<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="generator" content="www.jsdaima.com"  data-variable=",cn,10001,,10001,M1156015" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <title>死亡健身</title>
    <meta name="author" content="js代码" />
    <meta name="copyright" content="js代码" />
    <link rel='stylesheet' href='/user/css/index.css'>
    <script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
    <script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script>
    <script src="/user/js/jquery-3.5.0.js"></script>
    <script src="/user/layer/layer.js"></script>
    <script type="text/javascript">
axios.interceptors.response.use(function (response) {
	console.log(response);
	console.log(response.headers);
	console.info("状态码："+response.data.code);
	if (response.data.code===500){
		window.location.href="/error/500.html";
	}
	return response;
}, function (error) {
	return Promise.reject(error);
});
</script>
</head>

<body class=" nav-header">

<header class="">
    <div class="head-box">
        <div class="container">
            <div class="head-left">
                <div class="head-left-wrapper">
                    <div class="head-left-slide">
                        <p>
                            欢迎光临死亡健身！
                        </p>

                    </div>
                </div>
            </div>
            <div class="head-right">
                <div class="head-other">
                    <b>
                        登录/注册
                        <i class="caret">
                        </i>
                    </b>
                    <span>
                                <a href="login.html" title="登录">
                                    <i class="fa fa-bookmark">
                                    </i>
                                    登录
                                </a>
                                <hr />
                                <a href="regist.html" title="注册">
                                    <i class="fa fa-book">
                                    </i>
                                    注册
                                </a>
                            </span>
                </div>
            </div>
        </div>
    </div>
</header>
<nav class="navbar navbar-default met-nav " role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle hamburger hamburger-close collapsed"
                    data-target="#navbar-default-collapse" data-toggle="collapse">
                        <span class="sr-only">
                            Toggle navigation
                        </span>
                <span class="hamburger-bar">
                        </span>
            </button>
            <a href="#" class="navbar-brand navbar-logo vertical-align" title="">
                <h1 class='hide'>
                    死亡健身
                </h1>
                <div class="vertical-align-middle">
                    <img src="picture/logo.png" alt="" title=""
                    />
                </div>
            </a>
            <h2 class='hide'>
            </h2>
        </div>
        <div class="collapse navbar-collapse navbar-collapse-toolbar" id="navbar-default-collapse">

            <ul class="nav navbar-nav navbar-right navlist">
                <li class="margin-right-20">
                    <a href="index.html" title="首页" class="link active">
                        首页
                    </a>
                </li>

                <li class="dropdown margin-right-20">
                    <a class="link  " href="course.html">
                        场馆信息
                    </a>
                    <ul style="display:none">
                    </ul>
                </li>
                <li class="dropdown margin-right-20">
                    <a class="link  " href="team.html">
                        学员信息
                    </a>
                    <ul style="display:none">
                    </ul>
                </li>
                <li class="dropdown margin-right-20">
                    <a class="link  " href="huanjing.html">
                        关注
                    </a>
                    <ul style="display:none">
                    </ul>
                </li>
                <li class="dropdown margin-right-20">
                    <a class="link  " href="contact.html">
                        通知
                    </a>
                    <ul style="display:none">
                    </ul>
                </li>
                <li class="dropdown margin-right-20">
                    <a class="link  " href="message.html">
                        个人中心
                    </a>
                    <ul style="display:none">
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>

<div class="met-column-nav ">
    <div class="container">
        <div class="row">
            <div class="sidebar-tile">
                <ul class="met-column-nav-ul invisible-xs">
                    <a href='/'>
                        主页
                    </a>
                    >
                    <a href='/a/zaixianliuyan/'>
                        注册
                    </a>
                </ul>
            </div>
        </div>
    </div>
</div>
<div class="feedback-box">
    <div class="container">
        <div class="feedback-cut">
            <div class="feedback-tag">
                <span>
                    <i>
                        账号注册
                    </i>
                </span>
                <img src="picture/bm.png">
                <font>
                    账号注册
                </font>
            </div>
            <div class="feedback-title">
                <b>
                    注册填写
                </b>
                <p>
                    ( 提示：
                    <i>
                        *
                    </i>
                    为必填选项 )
                </p>
            </div>
            <div class="feedback-form">
                <form id="app" enctype="multipart/form-data"
                      class="met-form met-form-validation">
                    <div class="form-group">
                        <label class="control-label ftype_input">
                            手机号
                        </label>
                        <div>
                            <input name='phoneNumber' v-model="phoneNumber" id="phoneNumber" class='form-control' type='text' placeholder='' data-fv-notempty="true"
                                   data-fv-message="不能为空" />

                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label ftype_input">
                            账号
                        </label>
                        <div>
                            <input name='uname' v-model="uname" id="uname" class='form-control' type='text' placeholder='' data-fv-notempty="true"
                                   data-fv-message="不能为空" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label ftype_input">
                            密码
                        </label>
                        <div>
                            <input name='pwd' v-model="pwd" id="pwd" class='form-control' type='text' placeholder='' data-fv-notempty="true"
                                   data-fv-message="不能为空" />
                        </div>
                    </div>
                    <input type="hidden" name="dede_fields" value="name,text;tel,text;content,multitext"
                    />
                    <input type="hidden" name="dede_fieldshash" value="8076bff3cb852fc847abc72e0eef105a"
                    />
                    <div class="form-group ftype_button">
                        <label>
                            &nbsp;
                        </label>
                        <div>
                            <button @click="regist" type="button" class="btn btn-primary btn-lg btn-block btn-squared">
                                注册
                            </button>
                        </div>
                        </span>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<div class="met-footnav">
    <div class="container">
        <div class="row mob-masonry">
            <div class="col-md-2 col-sm-3 col-xs-6 list masonry-item">
                <h4>
                    <a href="#" title="关于我们">
                        关于我们
                    </a>
                </h4>

            </div>
            <div class="col-md-2 col-sm-3 col-xs-6 list masonry-item">
                <h4>
                    <a href="#" title="新闻资讯">
                        新闻资讯
                    </a>
                </h4>

            </div>
            <div class="col-md-2 col-sm-3 col-xs-6 list masonry-item">
                <h4>
                    <a>
                        会馆信息
                    </a>
                </h4>

            </div>
            <div class="col-md-2 col-sm-3 col-xs-6 list masonry-item">
                <h4>
                    <a>
                        更多
                    </a>
                </h4>
            </div>
            <div class="col-md-4 col-ms-12 col-xs-12 info masonry-item">
                <div class="info-phone">
                    <b>
                        服务热线
                    </b>
                    <em>
                        <a>
                            400-123-4567
                        </a>
                    </em>
                    <p>
                        客服服务时段：周一至周五，9:30 - 20:30，节假日休息
                    </p>

                </div>
            </div>
        </div>
    </div>
</div>

<footer>
    <div class="container text-center">
        <div class="powered_by_metinfo">
            Copyright &copy; 2002-2020 死亡健身 版权所有
        </div>
    </div>
</footer>
<button type="button" class="btn btn-icon btn-primary btn-squared met-scroll-top hide">
    <i class="icon wb-chevron-up" aria-hidden="true">
    </i>
</button>
<script src="js/index.js">
</script>

<script type="text/javascript">
    new Vue({
        el:"#app",
        data:{
            uname:"",
            pwd:"",
            phoneNumber:""
        },
        methods:{
            regist:function () {
                console.log(this.uname);
                var params=new URLSearchParams();
                params.append("uname",this.uname);
                params.append("pwd",this.pwd);
                params.append("phoneNumber",this.phoneNumber);
                axios.post("/user/register",params)
                    .then(res => {
                        console.info(res);
                        if (res.data.code ==200 ){
                            layer.msg('恭喜你注册成功!', {icon: 1});
                            window.location.href="login.html";
                        }else if (res.data.code ==5){
                            layer.msg('用户已存在请直接登录!', {icon: 5});
                        }else if (res.data.code ==6){
                            layer.msg('输入的手机号已存在，请转到验证码登录!', {icon: 5});
                        }else if (res.data.code ==306){
                            layer.msg('账号不规范应该输入2-10位包含字母数字的账号!', {icon: 5});
                        }else if (res.data.code ==305){
                            layer.msg('输入的手机号格式错误!', {icon: 5});
                        }else if (res.data.code ==307){
                            layer.msg('密码格式错误，请输入6-12位数字密码!', {icon: 5});
                        }
                        else{
                            layer.msg('系统异常!', {icon: 5});
                        }
                    });
            },
            cleanpwd:function(){
                this.phoneNumber = "";
                this.repass = "";
                this.pwd = "";
            }
        },
    });
</script>
</body>
</html>